<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/4/22 0022
 * Time: 10:04
 */

namespace app\home\model\dealer;


use app\home\model\BaseModel;

class Message extends BaseModel
{
    protected $autoWriteTimestamp = 'datetime';
    public function sendMessage($uId,$state,$content='你有新的消息',$o_id=0){
        $msg['u_id']=$uId;
        $msg['o_id']=$o_id;
        $msg['state']=$state;
        $msg['msg']=$content;
        $msg['create_time']=date_time();
        return $this->insert($msg);
    }
}